import { Component, OnInit, Input } from '@angular/core';

@Component({
    styleUrls: ['./index.scss'],
    selector: 'option-switch',
    template: `
        <div class="option-switch-container">
            <span class="title layout-align-center-start flex" style="display: flex;flex-direction: column;">
                <p class="title">{{option.title}}</p>
                <p class="content">{{option.description}}</p>
            </span>
            <span>
                <md-slide-toggle
                    [color]="color"
                    [checked]="option.checked"
                    (change)="option.operation(option)">
                </md-slide-toggle>
            </span>
        </div>
    `
})
export class OptionSwitch implements OnInit {
    @Input() option: any;
    constructor() { }
    color = "primary"
    ngOnInit() { }
}